<?php

namespace app\common\model;

use think\Model;

class GoodsCollect extends Model
{
    public function getCidTextAttr($value,$data)
    {
        $text = config('site.default_cate');
        if (in_array($data['cid'], [0,1,2,3,4,5,6,7,8,9,10])){
            return $text[$data['cid']];
        }else {
            if (!empty($data['cname'])) 
                return $data['cname'];
            else 
                return '未知';
        }
    }
    public function getIsTmallTextAttr($value,$data){
        $text = ['淘宝','天猫'];
        return $text[$data['is_tmall']];
    }
    
    
    
    
    
    
    
    
    
    
    
    
    
}
